Skip to content

Adopt the Whitaker Dylint suite in the lint gate and CI - #12

Merged
leynos merged 3 commits into
mainfrom
adopt-whitaker
Jul 9, 2026
Merged

Adopt the Whitaker Dylint suite in the lint gate and CI#12
leynos merged 3 commits into
mainfrom
adopt-whitaker

Conversation

@leynos

@leynos leynos commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

This branch adopts the Whitaker Dylint suite as part of the estate-wide lint rollout (see leynos/netsuke#410 for the pattern). make lint now runs Clippy followed by whitaker --all -- --all-targets --all-features with warnings denied, and CI installs the pinned installer via a cached cargo binstall before the lint step. The suite reports no findings on this codebase, so no code changes were needed.

Review walkthrough

  • Start with the Makefile lint target: Clippy runs first, then the Whitaker suite under RUSTFLAGS="-D warnings", with WHITAKER ?= whitaker overridable for environments without the wrapper.
  • Then review .github/workflows/ci.yml: WHITAKER_INSTALLER_VERSION is pinned to 0.2.5, the installer binary and binstall cache are keyed on that version, and whitaker-installer stages the lint libraries before make lint runs.

Validation

  • make check-fmt lint typecheck test markdownlint: all pass locally, with the Whitaker suite reporting zero findings over --all-targets --all-features.

Extend `make lint` to run the Whitaker Dylint suite
(`whitaker --all -- --all-targets --all-features`) after Clippy, with
warnings denied. CI installs `whitaker-installer` 0.2.5 via a cached
`cargo binstall` before the lint step, following the pattern
established in leynos/wireframe and leynos/netsuke.

The suite reports no findings on this codebase.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

CI now defines a WHITAKER_INSTALLER_VERSION variable, caches the whitaker-installer binary and cargo/binstall caches, and conditionally installs it before execution. The Makefile's lint target adds a configurable WHITAKER command, running the Whitaker Dylint suite after Clippy.

Changes

Whitaker Dylint integration

Layer / File(s) Summary
Makefile Whitaker lint wiring
Makefile
Adds a WHITAKER ?= whitaker variable and updates the lint target to run Clippy followed by Whitaker with RUSTFLAGS, --all, and forwarded --all-targets --all-features; updates the target's description accordingly.
CI Whitaker installer caching and installation
.github/workflows/ci.yml
Adds a WHITAKER_INSTALLER_VERSION job environment variable, a caching step for the installer binary and related cargo/binstall caches keyed by OS/arch/version, and conditional installation logic that skips cargo binstall when whitaker-installer is already present before running it.

Sequence Diagram(s)

sequenceDiagram
  participant CIJob
  participant Cache
  participant CargoBinstall
  participant WhitakerInstaller

  CIJob->>Cache: restore whitaker-installer cache (keyed by version/OS/arch)
  Cache-->>CIJob: cache hit or miss
  alt whitaker-installer already present
    CIJob->>WhitakerInstaller: run whitaker-installer
  else not present
    CIJob->>CargoBinstall: install whitaker-installer at WHITAKER_INSTALLER_VERSION
    CargoBinstall-->>CIJob: installation complete
    CIJob->>WhitakerInstaller: run whitaker-installer
  end
Loading

Possibly related PRs

  • leynos/cuprum#167: Modifies the same Makefile lint target, adding Ruff via uv run rather than Whitaker, so both touch the shared lint recipe for different linters.

Poem

A rabbit sniffs out lint with glee,
Whitaker joins the Clippy spree.
Cache the binary, skip the wait,
Install it once, then celebrate!
🐇✨ Dylint checks, sharp and neat.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
Testing (Overall) ❌ Error No automated tests cover the new make lint/Whitaker CI orchestration; validation is only manual command runs and the repo has no test files. Add a targeted automated check for the lint recipe/CI installer path (for example, a shell test or workflow validation) that fails if the ordering or caching regresses.
Developer Documentation ⚠️ Warning docs/developers-guide.md lists make lint but omits Whitaker, while Makefile and CI add a new linting/tooling requirement. Update docs/developers-guide.md to document the Whitaker lint step, the required installer/version pin, and any new local setup prerequisites.
Testing (Unit And Behavioural) ⚠️ Warning No unit or behavioural tests were added; the diff only changes Makefile and CI workflow config. Add behavioural coverage for the new lint path and CI installer branches, or document why this workflow-only change needs no tests.
✅ Passed checks (17 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the Whitaker Dylint rollout in the lint gate and CI workflow.
Description check ✅ Passed The description directly matches the lint and CI changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
User-Facing Documentation ✅ Passed No user-facing behaviour changed; the PR only alters developer lint tooling and CI, and the existing docs already cover make lint.
Module-Level Documentation ✅ Passed PR only changes Makefile and CI; it does not add or alter any module files, and the lone Rust module already has module docs.
Testing (Property / Proof) ✅ Passed No input-range or state invariant was introduced; this is workflow-only linting, so property tests or proofs are not warranted.
Testing (Compile-Time / Ui) ✅ Passed No Rust/TypeScript compile-time or UI output changed; this PR only alters lint/CI wiring, so trybuild or snapshot coverage is not applicable.
Unit Architecture ✅ Passed PASS: The diff only changes CI/Makefile orchestration; it introduces no new application units, queries, or hidden dependencies.
Domain Architecture ✅ Passed Only Makefile and CI workflow changed; no domain code, invariants, or boundary logic were touched.
Observability ✅ Passed Only CI lint bootstrap and Makefile targets changed; no production/runtime path or observability surface was introduced, so the check is not applicable.
Security And Privacy ✅ Passed CI pins WHITAKER_INSTALLER_VERSION to 0.2.5 and keeps permissions read-only; Makefile adds no secret-bearing or external-input sinks.
Performance And Resource Use ✅ Passed No new unbounded loops or hot-path work; linting adds one extra bounded Whitaker invocation, and CI caches the installer by OS/arch/version to avoid repeated installs.
Concurrency And State ✅ Passed Only Makefile and GitHub Actions linting changes landed; no shared mutable state, async tasks, locks, or ordering-sensitive runtime code was introduced.
Architectural Complexity And Maintainability ✅ Passed The PR only adds explicit build/CI variables and a cached installer step; it introduces no new layers, abstractions, or hidden wiring.
Rust Compiler Lint Integrity ✅ Passed PASS: Diff touches only .github/workflows/ci.yml and Makefile; no Rust sources, lint suppressions, or clone churn were added.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch adopt-whitaker

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 37-44: The Install Whitaker step is using inline GitHub Actions
expression expansion for WHITAKER_INSTALLER_VERSION inside the shell script,
which triggers the template-injection warning. Update the workflow step to pass
WHITAKER_INSTALLER_VERSION via a step-level env mapping, then reference that
shell variable in the cargo binstall command within the Install Whitaker block.
Keep the change localized to the Install Whitaker step in ci.yml and preserve
the existing whitaker-installer guard logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5e2987e1-4818-41d4-9549-fcff80ea2321

📥 Commits

Reviewing files that changed from the base of the PR and between 7254c17 and 91ee17c.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • Makefile

Comment thread .github/workflows/ci.yml
The pinned shared `setup-rust` action in this repository predates
binstall provisioning, so the Whitaker install step failed with
"no such command: `binstall`". Try binstall first and build the
installer from crates.io otherwise; the cached binary makes the
fallback a one-off cost.
Pass WHITAKER_INSTALLER_VERSION to the run block through the shell
environment rather than inline `${{ env }}` template expansion, which
zizmor flags as a template-injection risk; the job-level `env:` block
already exports the variable. Add `--locked` to the cargo binstall
invocation so that its compile-from-source fallback resolves
dependencies from the published lockfile, keeping fallback builds
reproducible.
@leynos
leynos merged commit b0b05c1 into main Jul 9, 2026
5 checks passed
@leynos
leynos deleted the adopt-whitaker branch July 9, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant